home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
bpl70n15.zip
/
README.DOC
< prev
next >
Wrap
Text File
|
1994-03-18
|
19KB
|
374 lines
Borland-Pascal 7.0 Runtime Libary Update - Release 1.4 18-MAR-1994
Welcome to BPL70N15.ZIP, a collection of fast replacement libraries
for your Turbo Pascal 7.0 / Borland Pascal 7.0 compiler. There are
three libraries in this package, a real mode library (TURBO.TPL), a
DOS protected mode library (TPP.TPL), and a Windows library (TPW.TPL).
Every file is a complete replacement for the original library bearing
the same name that came with your Pascal compiler. Due to the many
optimizations in the replacement libraries, many programs compiled
with these libraries will run faster. For more detailed information
on possible performance improvements, see the file PERFORM.DOC. Only
performance information for real mode and DOS protected mode programs
can be provided at the moment.
Those users already familiar with my previous project, the fast
replacement library for Turbo Pascal 6.0 (distributed as TPL60N19.ZIP),
may be disappointed that not all the features of that program have
been included in BPL70N15.ZIP yet. I don't have much time at the moment,
but still wanted to provide a BP 7.0 version of my library as soon as
possible. So I decided to port the performance relevant stuff first
and work on the other aspects later.
The libaries in BPL70N15 maintain 99.9% compatibility with the original
libraries. Differences are mostly caused by bug fixes and enhancements.
Some bugs from the original libraries supplied by Borland have been
eliminated, but there can be no guarantee that new ones have not crept
in. Most of the code in the BPL70N15.ZIP libraries was ported from the
latest version of my fast replacement library for Turbo Pascal 6.0,
TPL60N19.ZIP, which has been proven to be a stable and reliable product.
If you discover any bugs, or have other comments, please let me know.
My email and snail mail addresses are given below. Although I am under
severe time constraints, I will try as hard as possible to fix any bugs
reported in as short a time as possible.
The legal conditions under which Borland is distributing the source code
of the Borland Pascal 7.0 run-time libraries are not entirely clear to me.
To stay on the safe side, I assume that they are the same as for the RTL
source for the TP 6.0 compiler. Under these conditions, I am not allowed
to distribute modified source modules from the library. I may only
provide the binaries to third parties. However, some of the modules in
the BPL70N15.ZIP libaries do not contain a single line of code written
by Borland and are written entirely by me. I am including the source for
these modules for your reference. The source of the arithmetic routines
can be found in the file ARISOURC.ZIP. The source code of most of the
string routines is contained in the file STRSOURC.ZIP. The code of the
arithmetic and string routines is hereby released into the public domain.
You may use it in your own programs under the condition that you do not
include it into a commercial product. Parties interested in commercial
use of my code should contact me at my address below.
Original library code is Copyright (C) 1983,92 Borland International
New / additional library code is Copyright (C) 1988-1994
Norbert Juffa, Wielandtstr. 14, 76137 Karlsruhe, Germany
Internet: S_JUFFA@IRAVCL.IRA.UKA.DE
Contents of this document:
I. Capabilities of RTL replacement
II. Revision History
III. References
I. Capabilities of RTL replacement
==================================
General note:
BPL70N15 provides you with optimized libraries, it does not enhance
the code produced by the Borland Pascal compiler. Thus, only code
that uses many library calls can be expected to experience significant
performance advantages. Library calls are made by BP 7.0 to operate
on LONGINTs, STRINGs, REALs, SETs, perform heap operations such as
allocating and deallocating memory (New, Dispose, GetMem, FreeMem),
as well as to perform other tasks. One exception where BPL70N15 speeds
up your code although no calls to optimized library routines are
made is floating-point applications using a 287 or 387 coprocessor.
If want to speed up your applications even further than can be
accomplished by using BPL70N15, you might want to look at the
"Sally TPU peephole optimizer" (SPO for short) written by Morten
Welinder (terra@diku.dk). Unlike BPL70N15, this program is not in
the public domain, but Morten grants free use of the program for
personal, non-commercial use. SPO is a peephole optimizer that aims
at optimizing the code produced by the Pascal compiler. Peephole
optimizations means that the optimizer looks at a rather small
collection of machine instructions at a time and replaces certain
sequences it finds with optimized code. A TPU-optimizer speeds up
those parts of a program that can't be enhanced by a replacement
library and vice versa. So it might be a good idea to combine both
tools to get the best performance out of your BP 7.0 programs. The
SPO optimizer is currently distributed as a file SPO120.ZIP. It
should be available from all ftp-sites that carry BPL70N15 and in
particular can be downloaded from garbo.uwasa.fi, which is the upload
site for the program. Please note that this is not intended to be
an endorsement of the program. Rather, the info provided should be
thought of as being a service to those users of BPL70N15 who want
to speed up their programs even further than possible by using
BPL70N15.
Improvements in SYSTEM module
-----------------------------
o REAL type software arithmetic operations now comply with ANSI/IEEE
Standard 754-1985 for Binary Floating Point Arithmetic [1,2] as much
as possible. Note that REAL arithmetic by design differs from the
standard in many ways, especially available numeric formats, value
set, and available operations. The rounding mode implemented here
is "round to nearest or even" as specified by the standard. Add,
Subtract, Multiply, Squaring, Division, and Square Root deliver
exact results with regard to this rounding mode, as demanded by the
standard. Conversions from REAL to LONGINT and from EXTENDED to REAL
use rounding to nearest or even, as specified in the standard. Correct
implementation of above features was tested with the PARANOIA test
program [3]. The correctness of basic REAL arithmetic functions has
also been tested against the coprocessor/emulator EXTENDED format
with the program FUN1_TST. The EXTENDED format carries approximately
19 decimal digits of precision. This description applies to all three
libraries in the package.
o REAL arithmetic operations have been sped up. Speed-up for SQRT varies
between a factor of 11 for a 8086 and 30 for a 486DLC. FRAC now executes
at twice the original speed and speed-up is between 50% and 100% for
SIN, COS, ARCTAN, LN, EXP and division (2.8x speed up for division on
80386). Overall numeric processing power using REAL arithmetic increases
by about 52% for an 8086 and by 85% for an Cyrix 486DLC as measured
by the WHETSTONE benchmark [4,5]. This description applies to all three
libraries, but the actual values cited are for the real mode library
TURBO.TPL and may be different for the other libraries. In general,
DOS protected mode and Windows programs tend to be slower than real mode
programs by 5-50%.
o Overall accuracy of REAL arithmetic transcendental functions has been
improved as indicated by Cody&Waite's ELEFUNT tests [6]: DLOG, DEXP,
DATAN, DSIN. Correct argument reduction ensures that relative error
over the whol